package com.erp.service.impl;

import com.erp.entity.GoodsWarehouse;
import com.erp.mapper.GoodsWarehouseMapper;
import com.erp.service.GoodsWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsWarehouseServiceImpl implements GoodsWarehouseService {

    @Autowired
    private GoodsWarehouseMapper goodsWarehouseMapper;

    @Override
    public List<GoodsWarehouse> getAllInventoryInformationByGoodsId(Integer id) {
        return goodsWarehouseMapper.getAllInventoryInformationByGoodsId(id);
    }

    @Override
    public int add(GoodsWarehouse goodsWarehouse) {
        return goodsWarehouseMapper.add(goodsWarehouse);
    }

    @Override
    public GoodsWarehouse isExit(Integer gid, String warehouseName) {
        return goodsWarehouseMapper.isExit(gid, warehouseName);
    }

    @Override
    public int update(GoodsWarehouse goodsWarehouse) {
        return goodsWarehouseMapper.update(goodsWarehouse);
    }
}
